use hyprland::{
    data::{Client, Clients},
    shared::HyprData,
};
use hyprwls::command::Command;

fn main() {
    let command = Command::new();
    if command.exist_and_kill() {
        return;
    }

    let clients = Clients::get().unwrap();
    let clients: Vec<Client> = clients.into_iter().filter(|x| x.mapped).collect();
    if !clients.is_empty() {
        let client = command.select_client(clients);
        if let Some(client) = client {
            command.fouce_client(client);
        }
    }
}
